﻿using System;
using System.Xml;
using System.Xml.Serialization;

namespace WriteToAzureQueue
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length == 0)
                Environment.Exit(0);

            QueueOpguestthumbsClient client = null;

            try
            {
                QueueMessageType queueMessage = new QueueMessageType();
                queueMessage.MessageText = args[0];

                PutMessageRequest request = new PutMessageRequest();
                request.QueueMessage = queueMessage;

                client = new QueueOpguestthumbsClient();
                client.PutMessage(queueMessage);
            }
            finally
            {
                if (client != null)
                    client.Close();
            }
        }
    }
}
